
// MIT License
// 
// Copyright (c) 2009-2017 Luca Piccioni
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
// 
// This file is automatically generated

#pragma warning disable 649, 1572, 1573

// ReSharper disable RedundantUsingDirective
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;

using Khronos;

// ReSharper disable CheckNamespace
// ReSharper disable InconsistentNaming
// ReSharper disable JoinDeclarationAndInitializer

namespace OpenGL
{
	public partial class Gl
	{
		/// <summary>
		/// [GL] Value of GL_TEXTURE_CROP_RECT_OES symbol.
		/// </summary>
		[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
		public const int TEXTURE_CROP_RECT_OES = 0x8B9D;

		/// <summary>
		/// [GLES1.1] glDrawTexsOES: draws a texture rectangle to the screen
		/// </summary>
		/// <param name="x">
		/// Specify the position of the affected screen rectangle.
		/// </param>
		/// <param name="y">
		/// Specify the position of the affected screen rectangle.
		/// </param>
		/// <param name="z">
		/// Specify the position of the affected screen rectangle.
		/// </param>
		/// <param name="width">
		/// Specifies the width and height of the affected screen rectangle in pixels.
		/// </param>
		/// <param name="height">
		/// Specifies the width and height of the affected screen rectangle in pixels.
		/// </param>
		[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
		public static void DrawTexOES(short x, short y, short z, short width, short height)
		{
			Debug.Assert(Delegates.pglDrawTexsOES != null, "pglDrawTexsOES not implemented");
			Delegates.pglDrawTexsOES(x, y, z, width, height);
			LogCommand("glDrawTexsOES", null, x, y, z, width, height			);
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GLES1.1] glDrawTexiOES: draws a texture rectangle to the screen
		/// </summary>
		/// <param name="x">
		/// Specify the position of the affected screen rectangle.
		/// </param>
		/// <param name="y">
		/// Specify the position of the affected screen rectangle.
		/// </param>
		/// <param name="z">
		/// Specify the position of the affected screen rectangle.
		/// </param>
		/// <param name="width">
		/// Specifies the width and height of the affected screen rectangle in pixels.
		/// </param>
		/// <param name="height">
		/// Specifies the width and height of the affected screen rectangle in pixels.
		/// </param>
		[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
		public static void DrawTexOES(int x, int y, int z, int width, int height)
		{
			Debug.Assert(Delegates.pglDrawTexiOES != null, "pglDrawTexiOES not implemented");
			Delegates.pglDrawTexiOES(x, y, z, width, height);
			LogCommand("glDrawTexiOES", null, x, y, z, width, height			);
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GLES1.1] glDrawTexxOES: draws a texture rectangle to the screen
		/// </summary>
		/// <param name="x">
		/// Specify the position of the affected screen rectangle.
		/// </param>
		/// <param name="y">
		/// Specify the position of the affected screen rectangle.
		/// </param>
		/// <param name="z">
		/// Specify the position of the affected screen rectangle.
		/// </param>
		/// <param name="width">
		/// Specifies the width and height of the affected screen rectangle in pixels.
		/// </param>
		/// <param name="height">
		/// Specifies the width and height of the affected screen rectangle in pixels.
		/// </param>
		[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
		public static void DrawTexOES(IntPtr x, IntPtr y, IntPtr z, IntPtr width, IntPtr height)
		{
			Debug.Assert(Delegates.pglDrawTexxOES != null, "pglDrawTexxOES not implemented");
			Delegates.pglDrawTexxOES(x, y, z, width, height);
			LogCommand("glDrawTexxOES", null, x, y, z, width, height			);
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GLES1.1] glDrawTexsvOES: draws a texture rectangle to the screen
		/// </summary>
		/// <param name="coords">
		/// Specifies a pointer to the coords for the affected screen rectangle.
		/// </param>
		[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
		public static void DrawTexOES(short[] coords)
		{
			unsafe {
				fixed (short* p_coords = coords)
				{
					Debug.Assert(Delegates.pglDrawTexsvOES != null, "pglDrawTexsvOES not implemented");
					Delegates.pglDrawTexsvOES(p_coords);
					LogCommand("glDrawTexsvOES", null, coords					);
				}
			}
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GLES1.1] glDrawTexivOES: draws a texture rectangle to the screen
		/// </summary>
		/// <param name="coords">
		/// Specifies a pointer to the coords for the affected screen rectangle.
		/// </param>
		[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
		public static void DrawTexOES(int[] coords)
		{
			unsafe {
				fixed (int* p_coords = coords)
				{
					Debug.Assert(Delegates.pglDrawTexivOES != null, "pglDrawTexivOES not implemented");
					Delegates.pglDrawTexivOES(p_coords);
					LogCommand("glDrawTexivOES", null, coords					);
				}
			}
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GLES1.1] glDrawTexxvOES: draws a texture rectangle to the screen
		/// </summary>
		/// <param name="coords">
		/// Specifies a pointer to the coords for the affected screen rectangle.
		/// </param>
		[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
		public static void DrawTexOES(IntPtr[] coords)
		{
			unsafe {
				fixed (IntPtr* p_coords = coords)
				{
					Debug.Assert(Delegates.pglDrawTexxvOES != null, "pglDrawTexxvOES not implemented");
					Delegates.pglDrawTexxvOES(p_coords);
					LogCommand("glDrawTexxvOES", null, coords					);
				}
			}
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GLES1.1] glDrawTexfOES: draws a texture rectangle to the screen
		/// </summary>
		/// <param name="x">
		/// Specify the position of the affected screen rectangle.
		/// </param>
		/// <param name="y">
		/// Specify the position of the affected screen rectangle.
		/// </param>
		/// <param name="z">
		/// Specify the position of the affected screen rectangle.
		/// </param>
		/// <param name="width">
		/// Specifies the width and height of the affected screen rectangle in pixels.
		/// </param>
		/// <param name="height">
		/// Specifies the width and height of the affected screen rectangle in pixels.
		/// </param>
		[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
		public static void DrawTexOES(float x, float y, float z, float width, float height)
		{
			Debug.Assert(Delegates.pglDrawTexfOES != null, "pglDrawTexfOES not implemented");
			Delegates.pglDrawTexfOES(x, y, z, width, height);
			LogCommand("glDrawTexfOES", null, x, y, z, width, height			);
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GLES1.1] glDrawTexfvOES: draws a texture rectangle to the screen
		/// </summary>
		/// <param name="coords">
		/// Specifies a pointer to the coords for the affected screen rectangle.
		/// </param>
		[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
		public static void DrawTexOES(float[] coords)
		{
			unsafe {
				fixed (float* p_coords = coords)
				{
					Debug.Assert(Delegates.pglDrawTexfvOES != null, "pglDrawTexfvOES not implemented");
					Delegates.pglDrawTexfvOES(p_coords);
					LogCommand("glDrawTexfvOES", null, coords					);
				}
			}
			DebugCheckErrors(null);
		}

		internal static unsafe partial class Delegates
		{
			[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glDrawTexsOES(short x, short y, short z, short width, short height);

			[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
			[ThreadStatic]
			internal static glDrawTexsOES pglDrawTexsOES;

			[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glDrawTexiOES(int x, int y, int z, int width, int height);

			[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
			[ThreadStatic]
			internal static glDrawTexiOES pglDrawTexiOES;

			[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glDrawTexxOES(IntPtr x, IntPtr y, IntPtr z, IntPtr width, IntPtr height);

			[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
			[ThreadStatic]
			internal static glDrawTexxOES pglDrawTexxOES;

			[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glDrawTexsvOES(short* coords);

			[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
			[ThreadStatic]
			internal static glDrawTexsvOES pglDrawTexsvOES;

			[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glDrawTexivOES(int* coords);

			[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
			[ThreadStatic]
			internal static glDrawTexivOES pglDrawTexivOES;

			[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glDrawTexxvOES(IntPtr* coords);

			[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
			[ThreadStatic]
			internal static glDrawTexxvOES pglDrawTexxvOES;

			[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glDrawTexfOES(float x, float y, float z, float width, float height);

			[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
			[ThreadStatic]
			internal static glDrawTexfOES pglDrawTexfOES;

			[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glDrawTexfvOES(float* coords);

			[RequiredByFeature("GL_OES_draw_texture", Api = "gles1")]
			[ThreadStatic]
			internal static glDrawTexfvOES pglDrawTexfvOES;

		}
	}

}
